function my_matMeta(Path)
	% my_matmeta(Path)
	% -------------------------
	% Description:
	% 	write variable info into meta file
	% Date: 2022/10/25
	% Author: Sid Chen
	
	fprintf('\n\n\n--------------------------------\n');
	fprintf('Write Meta Data\n\n');

	if contains(Path, '.mat')
		% do nothing
	else
		Path = strcat(Path, '.mat');
	end
	FileObj = dir(Path);
	Dir = FileObj.folder;
	Name = FileObj.name(1:end-4);
	out_path = fullfile(Dir, strcat(Name,'.meta'));

	% if diary exist, rm it
	if isfile(out_path)
		% rm it
		delete(out_path);
	end
	diary(out_path);

	a = whos('-file',fullfile(FileObj.folder, FileObj.name));
	whos('-file',fullfile(FileObj.folder, FileObj.name))

	% if has struct, print field of struct
	Index = {a.class} == "struct";
	NameList = {a.name};
	NameList = NameList(Index);
	if any(Index)
		for ii = 1:numel(NameList)
			load(Path, NameList{ii});
			disp(evalc(sprintf("%s",NameList{ii})));
		end
	end
	diary off;
end
